feat(plan): Plan page version cards + create modal - #61
Merged
Conversation
Replace inline plan editor and collapsible version history with a card-based layout matching the Reports page pattern: - Active version shown as expanded card with green ring indicator and "Active" badge (CheckCircle2 icon) - Previous versions as collapsed cards (click to expand and view day/exercise breakdown via PlanDayCard) - Plan creation moved to a modal Dialog triggered by "New Plan" button in the page header - New usePlanVersions hook fetches all versions from the API - Version query invalidation added to useCreatePlan and useDecideAdjustments for cache consistency - Empty state with centered CTA matching other pages - PlanVersionHistory component removed (replaced by PlanVersionCard) - 3 new E2E tests for version display, active indicator, and expand/collapse - Product capabilities doc updated for UC-PLAN-01 and UC-PLAN-02 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
usePlanVersionshook to fetch all versions fromGET /api/workout-plans/:id/versionsuseCreatePlananduseDecideAdjustmentsnow invalidate version queriesPlanVersionHistorycomponent (replaced byPlanVersionCard)Changes
PlanPage.tsxPlanVersionCard.tsxPlanVersionHistory.tsxuseWorkoutPlan.tsusePlanVersionshook + version invalidationplan-versions.jsonPlanPage.ts(E2E POM)workout-plan-tuner.spec.tsproduct-capabilities.mdTest plan
npm run build— shared + frontend passnpm run lint— 0 errors (2 pre-existing warnings)npm run format:check— cleannpm test— 484 unit tests pass (410 backend + 74 frontend)npx playwright test e2e/workout-plan-tuner.spec.ts)🤖 Generated with Claude Code